package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component("userService")
public class UserServiceImpl {

    @Qualifier("userDao")
    @Autowired
    private UserDao userDao;

    @Value("admin")
    private String adminName;

    public void save() {
        System.out.println("impl里save"+adminName);
        userDao.save();

    }
    public void setUserDao(UserDao userDao){
        this.userDao=userDao;
    }
}
